const page = {
    state: {
        pageTotal: 0,
        pageSize: 10,
        pageNumber: 1
    },
    mutations: {
        changePage: (({state, res}) => {
            state.pageNumber = res
        }),
        changePageSize: (({state, res}) => {
            state.pageSize = res
        })
    },
    actions: {
        // 切换页码
        changePage: (({commit, pageNumber}) => {
            commit('changePage', pageNumber)
        }),
        // 修改每页显示条数
        changePageSize: (({commit, pageSize}) => {
            commit('changePageSize', pageSize)
        })
    }
}